package com.itheima.controller;

import com.itheima.pojo.*;
import com.itheima.service.LogService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@Slf4j
@RequestMapping("/log")
public class LogController {
    @Autowired
    private LogService logService;

    /**
     * 接口用于日志信息的分页查询
     * @param pagination
     * @return
     */
    @GetMapping("/page")
    public Result getPage(Pagination pagination){
       log.info("分页查询，参数：{}",pagination);
        PageResult<OperateLog>  list= logService.pageList(pagination);
        return Result.success(list);

    }

}
